#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Zhangcl
import os
import sys
# base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# print(base_dir)
# sys.path.append(base_dir)
# from conf import setting
#
# host_path = setting.HOST_FILE_PATH
# file = os.listdir(host_path)
# print(file)
# for index, item in enumerate(file):
#     print(index, item)
# if file[index]:
#     print(file[index])

file = 'D:/1.txt'
a = '192.168.3.74'
print(os.path.split(file))
print(os.path.splitext(file))
path,ex=os.path.splitext(file)[0],os.path.splitext(file)[1]
print(path+'_'+a+ex)